import { GroupVO } from '@/api/system/group/types';
import { VxeGridProps } from 'vxe-table';

export function getTableConfig(): VxeGridProps<GroupVO> {
  return {
    id: 'tenant',
    loading: false,
    height: 'auto',
    autoResize: true,
    border: 'inner',

    resizable: true,
    showOverflow: 'tooltip',
    stripe: true,
    rowConfig: {
      isHover: true,
      keyField: 'id'
      // height: 56
    },
    customConfig: {
      storage: true
    },
    columns: [
      { sortable: true, field: 'groupCode', title: '用户组编码', sortable: true },
      { sortable: true, field: 'groupName', title: '用户组名称', sortable: true },
      // { sortable: true, field: 'groupSort', title: '显示顺序' },
      { sortable: true, field: 'status', title: '状态', slots: { default: 'status' } },
      { sortable: true, field: 'remark', title: '备注' },
      { sortable: true, field: 'handle', title: '操作', slots: { default: 'handle' } }
    ],
    data: [] as GroupVO[]
  };
}
